import homeCategoryHead  from '@/api/home'
const state = {
    categoryList:[]
}
const mutations = {
    setCategoryList(state,value){
        state.categoryList = value
    }
}
const actions = {
    async getCategoryList({commit}){
        const res = await homeCategoryHead()
        commit('setCategoryList',res.result)
        console.log(res);
    }
}
const getters = {}
export default {
    namespaced:true,
    state,
    mutations,
    actions,
    getters
}